<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  function processErrorTest (data) {
    let { room } = data;
    if (!room) {
      throw TypeError('params { room } not find!')
    }
  }

  try {
    processErrorTest()
  } catch (error) {
    console.error(error)
  }
</script>
</body>
</html>